package com.projectframe.base.service;

import java.io.Serializable;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;

import com.projectframe.base.db.dao.IBaseDao;

public class BaseService implements IBaseService
{
    protected Logger LOG = Logger.getLogger(this.getClass());
    
    @Autowired
    private IBaseDao baseDao;

    public void deleteData(Object model)
    {
        baseDao.deleteData(model);
    }

    public <T> T insertData(T model)
    {
        return baseDao.insertData(model);
    }

    public <T> T updateData(T model)
    {
        return baseDao.updateData(model);
    }
    
    public <T> T findByPk(final Class<?> refClass, final Serializable key)
    {
        return baseDao.findByPk(refClass, key);
    }
}
